package com.ifnk.portaljava.hlyt.dao;

import com.ifnk.portaljava.hlyt.beans.Role;
import com.ifnk.portaljava.hlyt.beans.User;

import java.sql.Connection;
import java.util.List;

public interface IUserJdbcDao {
	List findAll() throws Exception;

	int save(User user, Connection conn) throws Exception;

	List findByName(String uName) throws Exception;
	
	User validaty(String userName,String password) throws Exception;

	void delete(User user, Connection conn) throws Exception;

	void deleteUserRole(int userId, Connection conn) throws Exception;

	void update(User user, Connection conn) throws Exception;

	void saveUserRole(Role role, int userId, Connection conn) throws Exception;

	void updateLocked(int userId, int locked, Connection conn) throws Exception;

	List<User> findByRoleName(String roleName) throws Exception;

	User findById(int userId) throws Exception;
}
